Skip to content

2.x: fix Observable.zip to dispose eagerly#5121

Merged
akarnokd merged 1 commit intoReactiveX:2.xfrom
jbarr21:ObsZipEagerCancel
Feb 20, 2017
Merged

2.x: fix Observable.zip to dispose eagerly#5121
akarnokd merged 1 commit intoReactiveX:2.xfrom
jbarr21:ObsZipEagerCancel

Conversation

@jbarr21
Copy link
Contributor

@jbarr21 jbarr21 commented Feb 20, 2017

This PR fixes Observable.zip to dispose the sources outside the serialization loop, just like Flowable.zip does. This allows cancellation even if the serialization loop is busy/blocking inside an onNext emission.

In addition, a unit test was added to Observable.zip as well.

Reported in #5111.

@codecov-io
Copy link

Codecov Report

Merging #5121 into 2.x will decrease coverage by -0.07%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##                2.x   #5121      +/-   ##
===========================================
- Coverage     95.17%   95.1%   -0.07%     
+ Complexity     5566    5564       -2     
===========================================
  Files           620     620              
  Lines         40014   40020       +6     
  Branches       5632    5633       +1     
===========================================
- Hits          38082   38062      -20     
- Misses          929     941      +12     
- Partials       1003    1017      +14
Impacted Files Coverage Δ Complexity Δ
...x/internal/operators/observable/ObservableZip.java 100% <100%> (ø) 6 <ø> (ø)
...al/operators/observable/ObservableSampleTimed.java 90% <ø> (-6.67%) 3% <ø> (ø)
...rnal/subscriptions/ArrayCompositeSubscription.java 93.33% <ø> (-6.67%) 17% <ø> (-1%)
...l/operators/observable/ObservableFlatMapMaybe.java 90.19% <ø> (-5.23%) 2% <ø> (ø)
.../internal/operators/maybe/MaybeTakeUntilMaybe.java 95.91% <ø> (-4.09%) 2% <ø> (ø)
...vex/internal/operators/flowable/FlowableTimer.java 92.85% <ø> (-3.58%) 2% <ø> (ø)
...nternal/operators/parallel/ParallelSortedJoin.java 92.75% <ø> (-2.18%) 2% <ø> (ø)
.../main/java/io/reactivex/subjects/MaybeSubject.java 95.65% <ø> (-2.18%) 46% <ø> (-1%)
...operators/observable/ObservableConcatMapEager.java 97.29% <ø> (-2.17%) 2% <ø> (ø)
...activex/internal/disposables/DisposableHelper.java 98.14% <ø> (-1.86%) 27% <ø> (-1%)
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a342fd...87b4773. Read the comment docs.

@akarnokd akarnokd merged commit 4a32963 into ReactiveX:2.x Feb 20, 2017
@akarnokd akarnokd added this to the 2.0 backlog milestone Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants